﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Microsoft.Win32;
using System.Threading;
using System.Globalization;

namespace WpfTestApplication
{
    /// <summary>
    /// Interaction logic for WindowTestWindow.xaml
    /// </summary>
    public partial class MessageBoxTestWindow : Window
    {
        public MessageBoxTestWindow()
        {
            Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
            Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
            InitializeComponent();
        }

        private void btnShowMessageBox_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show("MessageBox Ok", "Some Information", MessageBoxButton.OK,
                            MessageBoxImage.Information);
            this.lblResult.Content = result;
        }

        private void btnShowMessageBoxOkCancel_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show(this, "MessageBox OkCancel", "Some Information", MessageBoxButton.OKCancel,
                            MessageBoxImage.Error);
            this.lblResult.Content = result;
        }

        private void btnShowMessageBoxYesNo_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show(this, "MessageBox YesNo", "Some Information", MessageBoxButton.YesNo, MessageBoxImage.Hand);
            this.lblResult.Content = result;
        }

        private void btnShowMessageBoxYesNoCancel_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show(this, "MessageBox YesNoCancel", "Some Information", MessageBoxButton.YesNoCancel, MessageBoxImage.Stop);
            this.lblResult.Content = result;
        }
    }
}
